<template>
  <div class="main">
    <!-- 登录框 -->
    <div class="login">
      <div class="login-in">
        <div class="title">校 园 帮</div>
        <input type="username" class="input" placeholder="学号" v-model="StudentID" />
        <input type="password" class="input" placeholder="密码" v-model="password" />
        <!-- 验证码 -->
        <div class="code">
          <input
            type="text"
            class="code-input"
            placeholder="验证码"
            v-model="verify"
            @keyup.enter="login"
          />
          <!-- <div class="auth-code" @click="refreshCode">
            <s-identify :identifyCode="identifyCode"></s-identify>
          </div> -->
        </div>
        <!-- 登录按钮 -->
        <el-button type="success" v-on:click="login" class="btn-login">登录</el-button>
        <!-- <button type="button" v-on:click="login" class="but-login">登录</button> -->
        <div class="F-R">
          <a v-on:click="ToForget" class="F">
            <span style="cursor:pointer">忘记密码</span>
          </a>
          <a v-on:click="GoRegister" class="R">
            <span style="cursor:pointer">用户注册</span>
          </a>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: 'Login',
  data () {
    return {
      StudentID: '',
      password: '',
      verify: ''
    }
  },
  methods: {
    login () {

    },
    GoRegister () {
      // 跳转到注册页面
      this.$router.push('/register')
    },
    ToForget () {

    }
  }
}
</script>

<style scoped>
.main {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  background-color: #efefef;
}
/* 登录框 */
.login {
  background-color: #fff;
  width: 420px;
  height: 420px;
  /* 绝对定位 设置登录框居中 */
  position: absolute;
  margin: auto;
  left: 0;
  top: 0;
  bottom: 6rem;
  right: 0;
  /* 虚化属性 */
  opacity: 0.8;
  /* 阴影效果 */
  box-shadow: 5px 5px 10px #888888;
  /* margin: 0rem,auto; */
  background-color: #ffffff;
  text-align: center;
  /* 圆角 */
  border-radius: 30px;
  /* border-top-right-radius:10px;
  border-top-left-radius:10px;
  border-bottom-left-radius:10px;
  border-bottom-right-radius:10px; */
}
/* 登录框内部 */
.login-in {
  display: flex;
  flex-flow: column;
  width: 60%;
  margin: auto;
}
.title {
  font-size: 28px;
  /* color: #374760; */
  margin: 35px 0 35px;
}
.input {
  width: 240px;
  height: 30px;
  margin: 0 auto 25px;
  /* border-radius: 5px; */
  text-align: left;
  font-size: 14px;
  padding-left: 10px;
}
.code {
  width: 100%;
  /* margin: 0 0 20px 0; */
  padding: 0;
}
.code-input {
  width: 150px;
  height: 30px;
  float: left;
  text-align: left;
  font-size: 14px;
  padding-left: 10px;
}
.btn-login {
  width: 254px;
  height: 40px;
  margin-top: 30px;
  /* background-color: #5bdb7b; */
}
.F-R {
  width: 100%;
  margin-top: 10px;
  display: flex;
}
.F {
  flex: 1;
  text-align: left;
  color: #014d94
}
.R {
  flex: 1;
  text-align: right;
  color: #014d94
}
</style>
